package com.ssy.lingxi.order.model.constant;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 * 订单字符枚举
 * @author 彭冬冬
 * @version 2.0.0
 * @date 2022-02-22
 */
public enum OrderStringEnum {

    DELIVERY_NUMBER(1, "发货单号:"),
    UPDATE(2, "修改"),
    REMARK_FORMAT1(3, "订单运费从￥{}修改为￥{}；原因为：{}；"),
    RECEIPT_NUMBER(4, "收货单号:"),
    REFUND_SUCCESSFULLY(5, "退款成功"),
    REFUND_FAILED(6, "退款失败"),
    NUMBER_OF_PAYMENTS(7, "支付次数:"),
    ;
    OrderStringEnum(Integer code, String name) {
        this.code = code;
    }

    /**
     * 订单来源枚举值
     */
    private Integer code;

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return LanguageHolder.getName(this.getDeclaringClass(), this.getCode());
    }
}
